package com.wlj.utils.suanfa;

public class Node {
    private final int value;
    private Node next;

    public Node(int value){
        this.value=value;
        this.next=null;
    }

    public int getValue() {
        return value;
    }

    public Node getNext() {
        return next;
    }

    public void setNext(Node next) {
        this.next = next;
    }

    public static void print(Node current) {
        if(current==null) {
            return ;
        }
        System.out.print(current.getValue());
        System.out.print(",");
        print(current.getNext());
    }
}
